Generally, the concept of virtualization in information processing systems allows multiple instances of one or more operating systems to run on a single system, even though each operating system (OS) is designed to have complete, direct control over the system and its resources. Virtualization is typically implemented by using software (e.g., a virtual machine monitor, or a “VMM”) to present to each OS a “virtual machine” (“VM”) having virtual resources, including one or more virtual processors, that the OS may completely and directly control, while the VMM maintains a system environment for implementing virtualization policies such as sharing and/or allocating the physical resources among the VMs (the “virtualization environment”).
The virtualization technologies have wide applications in the computer field with the development of computer systems. For example, such virtualization technologies can be used to implement a virtual desktop application which runs within a virtual machine of a host and accessed from a client over a network, such as, for example, Red Hat® Enterprise Virtualization for Desktops, a product of Red Hat, Inc. of Raleigh, N.C.
A user accessing a virtual machine (also referred to as “guest”) remotely from a client may want to copy data displayed in a client application and paste this data in a virtual machine application, and vice versa. Depending on the operating system of the client, various options may be available to the user for performing copy-paste operations. For example, the X server on a Linux® desktop, used for graphical display, provides 3 options for copy-paste commands: PRIMARY, SECONDARY and CLIPBOARD.
According to the PRIMARY option, any text selected using the mouse pointer or using shift and arrow keys on the keyboard is placed in the PRIMARY buffer; and when a “middle-click” using the mouse is performed using the middle mouse button or using the middle button emulation (by pressing left and right buttons at the same time), the PRIMARY buffer is queried. Alternatively, the X server may not store the selected text (referred to as “clipboard data”) but rather keep a note of which X client has the active PRIMARY data. When a middle-click is performed, the X server may query the X client with the most recent clipboard data. If there is the X client with the most recent clipboard data, this data is pasted in the window where the cursor was positioned when the middle-click was performed. Otherwise, nothing may be pasted (e.g., if the application in which the data was copied has been closed). The SECONDARY option is only accessed programmatically.
According to the CLIPBOARD option, when some data is selected and then copied using a copy item from the menu (either the toolbar or right-click menu or from a menu item like ‘Edit→Copy’, or other keyboard shortcuts like Ctrl+C, Ctrl+V or Shift+Insert, Shift+Delete, etc) or using a ‘cut’ operation (Ctrl+X or selecting ‘cut’ from a menu item) or a ‘drag and drop’ operation, the data is placed in the CLIPBOARD buffer. Subsequently, when a paste item is selected from the menu or a ‘paste’ or ‘drop’ operation is performed, the data from the CLIPBOARD buffer is pasted at the current location of the cursor. Alternatively, the X server may not store the data in the CLIPBOARD buffer but rather keep a note of which X client has the active CLIPBOARD data. When a paste operation is performed (a paste item is selected from the menu or a ‘paste’ or ‘drop’ operation is performed), the X server may query the X client with the most recent clipboard data and use this clipboard data for the paste operation.
A guest operating system may support the same or different options for copy and paste operations as compared to the client operating system. A user is likely to expect the copy and paste operations to work in a virtual machine environment in the same manner as they do in a non-virtualized environment.